//引入二次封装
import request from '@/utils/request'
//获取员工列表的接口
export const getEmployeeList = (page,pagesize) => request.get(`/sys/role?page=${page}&pagesize=${pagesize}`)
//添加员工的接口
export const addEmployee = (data) => request.post('/sys/role',data)
//删除员工的接口
export const deleteEmployee = (id) => request.delete(`/sys/role/${id}`)
//修改员工的接口
export const updateEmployee = (data) => request.put(`/sys/role/${data.id}`,data)
//获取已启用的角色列表
export const getRoleList = () => request.get('/sys/role/list/enabled')
//分配权限
export const assignAuth = (data) => request.put('/sys/user/assignRoles',data)
//分配角色权限
export const assignRoleAuth = (data) => request.put('/sys/role/assignPrem',data)
//获取角色详细
export const getRoleDetail = (id) => request.get(`/sys/role/${id}`)